package hello;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MessagePrinter {
    @Autowired(required = true)
    MessageService messageService;

    public void printMessage(){
        System.out.println(messageService.getMessage());
    }
}
